package cwinsor.raking.year2014;

import java.lang.reflect.Constructor;

/**
 * This static class enumerates PROPERTIES which are used in the system
 * A PROPERTY has an example object (a prototype) which
 * establishes the class (typically String or Integer)
 * It has a name which describes the property and can be
 * used as a column header.
 */
public final class PROP_E {

	private PropertyBase object; // prototype object
	private String name; // name

	private PROP_E(PropertyBase obj, String n) {
		object = obj;
		name = n;
	}; // private constructor

	// the PROPERTIES
	// first parameter is a PROTOTYPE (used to get class)
	// second parameter is CLASS of its output value (used to render)
	// second parameter is a NAME (column header)
	public static final PROP_E SKIP           = new PROP_E(new PropertyPhysicalInteger(), new String("SKIP"));
	public static final PROP_E FIRST_NAME     = new PROP_E(new PropertyPhysicalString(), new String("First"));
	public static final PROP_E LAST_NAME      = new PROP_E(new PropertyPhysicalString(), new String("Last"));
	public static final PROP_E POWER          = new PROP_E(new PropertyPhysicalInteger(),  new String("Power"));
	public static final PROP_E COACH          = new PROP_E(new PropertyPhysicalString(), new String("Coach"));
	public static final PROP_E GENDER         = new PROP_E(new PropertyPhysicalString(), new String("Gender"));
	public static final PROP_E VARSITY_NOVICE = new PROP_E(new PropertyPhysicalString(), new String("Var/Nov"));
	public static final PROP_E GRADE          = new PROP_E(new PropertyPhysicalInteger(),  new String("Grade"));
	public static final PROP_E HOME_PHONE     = new PROP_E(new PropertyPhysicalString(), new String("HomePh"));

	public static final PROP_E HAPPINESS = new PROP_E(new PropertyVirtualHappiness(), new String("Happiness"));

	// raker preference
	public static final PROP_E RP02AM = new PROP_E(new PropertyPhysicalInteger(), new String("C"));
	public static final PROP_E RP02PM = new PROP_E(new PropertyPhysicalInteger(), new String("C"));
	public static final PROP_E RP03AM = new PROP_E(new PropertyPhysicalInteger(), new String("C"));
	public static final PROP_E RP03PM = new PROP_E(new PropertyPhysicalInteger(), new String("C"));
	public static final PROP_E RP09AM = new PROP_E(new PropertyPhysicalInteger(), new String("C"));
	public static final PROP_E RP09PM = new PROP_E(new PropertyPhysicalInteger(), new String("C"));
	public static final PROP_E RP10AM = new PROP_E(new PropertyPhysicalInteger(), new String("C"));
	public static final PROP_E RP10PM = new PROP_E(new PropertyPhysicalInteger(), new String("C"));

	// raker last preference
	public static final PROP_E RLP02AM = new PROP_E(new PropertyPhysicalInteger(), new String("L"));
	public static final PROP_E RLP02PM = new PROP_E(new PropertyPhysicalInteger(), new String("L"));
	public static final PROP_E RLP03AM = new PROP_E(new PropertyPhysicalInteger(), new String("L"));
	public static final PROP_E RLP03PM = new PROP_E(new PropertyPhysicalInteger(), new String("L"));
	public static final PROP_E RLP09AM = new PROP_E(new PropertyPhysicalInteger(), new String("L"));
	public static final PROP_E RLP09PM = new PROP_E(new PropertyPhysicalInteger(), new String("L"));
	public static final PROP_E RLP10AM = new PROP_E(new PropertyPhysicalInteger(), new String("L"));
	public static final PROP_E RLP10PM = new PROP_E(new PropertyPhysicalInteger(), new String("L"));

	// team assignment
	public static final PROP_E TA02AM = new PROP_E(new PropertyPhysicalInteger(), new String("T02AM"));
	public static final PROP_E TA02PM = new PROP_E(new PropertyPhysicalInteger(), new String("T02PM"));
	public static final PROP_E TA03AM = new PROP_E(new PropertyPhysicalInteger(), new String("T03AM"));
	public static final PROP_E TA03PM = new PROP_E(new PropertyPhysicalInteger(), new String("T03PM"));
	public static final PROP_E TA09AM = new PROP_E(new PropertyPhysicalInteger(), new String("T09AM"));
	public static final PROP_E TA09PM = new PROP_E(new PropertyPhysicalInteger(), new String("T09PM"));
	public static final PROP_E TA10AM = new PROP_E(new PropertyPhysicalInteger(), new String("T10AM"));
	public static final PROP_E TA10PM = new PROP_E(new PropertyPhysicalInteger(), new String("T10PM"));

	public static final PROP_E END = new PROP_E(new PropertyPhysicalString(), new String("END"));

	// get the name
	public final String name() { return name; }


	public static PROP_E[] curPrefsList() {
		PROP_E[] list = { 
				RP02AM,
				RP02PM,
				RP03AM,
				RP03PM,
				RP09AM,
				RP09PM,
				RP10AM,
				RP10PM };
		return list;
	}

	public static PROP_E[] lastPrefsList() {
		PROP_E[] list = { 
				RLP02AM,
				RLP02PM,
				RLP03AM,
				RLP03PM,
				RLP09AM,
				RLP09PM,
				RLP10AM,
				RLP10PM };
		return list;
	}

	public static PROP_E[] teamAssignmentList() {
		PROP_E[] list = { 
				TA02AM,
				TA02PM,
				TA03AM,
				TA03PM,
				TA09AM,
				TA09PM,
				TA10AM,
				TA10PM };
		return list;
	}


	public Object getValue() {
		return object.getValue();
	}

	public PropertyBase prototype() {
		return object.prototype();
	}


}
